package com.blog.back.service;

import com.blog.dto.PageDTO;

/**
 * @author codeDorado
 * @version 1.0
 * @date 2020/8/16 0:26
 */
public interface IPageCheck {
    default boolean check(PageDTO pageDTO) {
        if (pageDTO.getUserId() == null) return false;
        if (pageDTO.getPageNum() <= 0) pageDTO.setPageNum(1);
        if (pageDTO.getPageSize() <= 0) pageDTO.setPageSize(10);
        return true;
    }
}
